<?php

$html = '';
if ($list_customer_order) {


    if ($is_group_customer == 0) {
//sắp xếp theo ngày ORDER hoặc theo mã sp: không gom nhóm khách được
        $html_total_result = '<table class="table table-striped table-bordered bootstrap-datatable datatable">
    <tr>
        <th>Tổng số khách hàng</th>
        <th>Tổng số sản phẩm</th>';
        if ($_SESSION["user_role"] == 1) {
            $html_total_result.='<th>Tổng AT<br/>(EU)</th>
        <th>Tổng PT<br/>(EU)</th>';
        }

        $html_total_result.='<th>Tổng tiền hàng<br/>(x1000 VNĐ)</th>


    </tr>
    <tr>
        <td>' . $total_result["total_customer"] . '</td>
        <td>' . $total_result["total_product"] . '</td>';
        if ($_SESSION["user_role"] == 1) {
            $html_total_result.='<td>' . number_format($total_result["total_at"]) . '</td>
        <td>' . number_format($total_result["total_pt"]) . '</td>';
        }
        $html_total_result.='<td>' . number_format($total_result["total_order_money"] / 1000) . '</td>


    </tr>
</table>';

        foreach ($list_customer_order as $customer_order) {
            $random_code = $customer_order->code_view;

            $color_photo_name = $customer_order->product_color . "_" . $customer_order->product_code . "_" . $customer_order->manufacture;
            $color_photo_name = $core->convert_string_friendly($color_photo_name) . ".jpg";
            $path_color_photo = dirname(dirname(dirname(__FILE__))) . DS . "photo" . DS . "extra_photo" . DS . "thumb_extra_photo" . DS . $color_photo_name;

            if (file_exists($path_color_photo)) {
                $src_photo = 'photo/extra_photo/' . $color_photo_name;
                $src_photo_thumb = 'photo/extra_photo/thumb_extra_photo/' . $color_photo_name;
            } else {
                $src_photo = 'photo/' . $customer_order->main_photo;
                $src_photo_thumb = 'photo/thumb_photo/200_' . $customer_order->main_photo;
            }
            $var_count++;
            if ($customer_order->total_current_money > 0) {
                $excess_cash = number_format($customer_order->total_current_money / 1000);
                $debit = 0;
            } else {
                $excess_cash = 0;
                $debit = number_format($customer_order->total_current_money / 1000);
            }
            $html.='<tr class="tr_' . $customer_order->customer_order_id . '">';
            $html.='<td class="center" >' . $var_count . '</td>';
            $html.='<td class="center" >';
            if ($customer_order->facebook_link != "") {
                $html.='<a href="' . $customer_order->facebook_link . '" target="_blank">' . $customer_order->facebook_name . '</a>';
            } else {
                $html.=$customer_order->facebook_name;

            }
            $html.='<p></p>
                    <button  class="btn btn-primary print_address_customer" type="button" rel="'. $customer_order->customer_id.'" >Print address</button>
                    <p></p>
                    <a target="_blank" href="../customerOrder.php?id='.$customer_order->customer_order_id.'&code='.$random_code.'">Link đơn hàng</a>
                    </td>';

            $html.='<td class="center" ><a href="addCustomer.php?id=' . $customer_order->customer_id . '" target="_blank">' . $customer_order->phone . '</a></td>';
            if ($customer_order->link_web == "") {
                $html.='<td class="center color_status">' . $customer_order->product_code . '</td>';
            } else {
                $html.='<td class="center color_status"><a href="' . $customer_order->link_web . '" target="_blank">' . $customer_order->product_code . '</a></td>';
            }


            $html.='<td class="center color_status">' . $customer_order->product_size . '</td>
    <td class="center color_status">

        Khách đặt: '.$customer_order->order_product_num.'
        <p>
            Đã mua: <span id="show_item_product_num_'.$customer_order->id.'">'.$customer_order->product_num.'</span>
            <div class="input-append">

                <input style="width: 50px;display: none" type="text" id="mrk_bought_product_num_'.$customer_order->id.'" name="customer_phone" size="5" value="'.$customer_order->product_num.'" >
            <button class="mrk_edit_product_num btn"  type="button" data-item-id="'.$customer_order->id.'">Sửa</button>
            <button class="mrk_update_product_num btn" style="display: none" type="button" data-item-id="'.$customer_order->id.'">Lưu</button>
            </div>
        </p>
    </td>
    <td class="center color_status">' . $customer_order->product_color . '</td>
    <td class="center color_status"><img rel="' . $src_photo . '" class="photo_product" src="' . $src_photo_thumb . '" width="100px"></td>
    <td class="center color_status">
        <select class="select_order_status" style="width: 120px;" rel="' . $customer_order->id . '" >
            <option value=0 ' . ($customer_order->order_status == 0 ? "selected" : "") . '>Store</option>
            <option value=1 ' . ($customer_order->order_status == 1 ? "selected" : "") . '>Online</option>
            <option value=2 ' . ($customer_order->order_status == 2 ? "selected" : "") . '>Hàng có sẵn</option>
            <option value=3 ' . ($customer_order->order_status == 3 ? "selected" : "") . '>Đã nhận hàng</option>
            <option value=4 ' . ($customer_order->order_status == 4 ? "selected" : "") . '>Đang shipping</option>
            <option value=5 ' . ($customer_order->order_status == 5 ? "selected" : "") . '>Khách đã nhận</option>
            <option value=6 ' . ($customer_order->order_status == 6 ? "selected" : "") . '>Hết hàng</option>
            <option value=7 ' . ($customer_order->order_status == 7 ? "selected" : "") . '>ORDER</option>
            <option value=8 ' . ($customer_order->order_status == 8 ? "selected" : "") . '>Chưa chắc chắn</option>
        </select>';
            if ($customer_order->order_status == 0) {
                $html.='<div>' . $core->changeDateMysqlToShow($customer_order->store_date) . '</div>';
            } elseif ($customer_order->order_status == 1) {
                $html.='<div>' . $core->changeDateMysqlToShow($customer_order->online_date) . '</div>';
            } elseif ($customer_order->order_status == 3) {
                $html.='<div>' . $core->changeDateMysqlToShow($customer_order->received_date) . '</div>';
            } elseif ($customer_order->order_status == 5) {
                $html.='<div>' . $core->changeDateMysqlToShow($customer_order->saled_date) . '</div>';
            } elseif ($customer_order->order_status == 7) {
                $html.='<div>' . $core->changeDateMysqlToShow($customer_order->customer_order_date) . '</div>';
            }

            $html.=' <div class="history_status"></div>
    </td>
    <td class="center color_status">
        <p class="description_product_detail" data-item-id="' . $customer_order->id . '">'.nl2br(htmlspecialchars($customer_order->description)).'</p>
        <button class="popup_edit_note_product" class="btn" type="button" rel="' . $customer_order->id . '">Sửa</button>
    </td>';
    if($customer_order->order_status == 6){
        $html.=' <td class="center gp_3" id="td_price_' . $customer_order->id . '">0</td>
        <td class="center gp_2" id="td_stamp_price_' . $customer_order->id . '">0</td>
        <td class="center gp_1" id="td_store_price_' . $customer_order->id . '">0</td>';
    }else{

        $html.=' <td class="center gp_3" id="td_price_' . $customer_order->id . '">' . number_format($customer_order->product_price / 1000) . '</td>
        <td class="center gp_2" id="td_stamp_price_' . $customer_order->id . '">' . number_format($customer_order->stamp_price) . '</td>
        <td class="center gp_1" id="td_store_price_' . $customer_order->id . '">' . number_format($customer_order->store_price) . '</td>';
    }

    $html.='
    <td class="center gp_2" id="td_total_stamp_price_' . $customer_order->id . '">' . number_format($customer_order->product_num * $customer_order->stamp_price) . '</td>
    <td class="center gp_1" id="td_total_store_price_' . $customer_order->id . '">' . number_format($customer_order->product_num * $customer_order->store_price) . '</td>
            
    <td class="center gp_3" id="td_total_price_' . $customer_order->id . '">' . number_format($customer_order->product_num * $customer_order->product_price / 1000) . '</td>
    <td class="center gp_3" ><a  class="popup_zen_payment" href="javascript:void(0);" rel="' . $customer_order->customer_order_id . '">' . number_format($customer_order->total_payment / 1000) . '</a></td>
    <td class="center gp_3" ></td>
    <td class="center gp_3" ></td>
    <td class="center" >' . $customer_order->order_description . '</td>
    <td class="center gp_4" >' . $customer_order->address . '</td>
    <td class="center gp_4" >';

            if ($customer_order->province == 1)
                $html.= "Ở tỉnh";
            else
                $html.= "Ở HN";

            $html.='</td>
    <td class="center gp_4" >' . $customer_order->name . '</td>
    <td class="center gp_4" >' . $customer_order->bank_account . '</td>
    <td class="center" >

    </td>
</tr>';
        }
    } else {
//gom theo khách
        $html_total_result = '<table class="table table-striped table-bordered bootstrap-datatable datatable">
    <tr>
        <th>Tổng số khách hàng</th>
        <th>Tổng số sản phẩm</th>';
        if ($_SESSION["user_role"] == 1) {
            $html_total_result.='<th>Tổng AT<br/>(EU)</th>
        <th>Tổng PT<br/>(EU)</th>';
        }

        $html_total_result.='<th>Tổng tiền hàng<br/>(x1000 VNĐ)</th>
        <th>Tổng cọc<br/>(x1000 VNĐ)</th>
        <th>Tổng thừa<br/>(x1000 VNĐ)</th>
        <th>Tổng thiếu<br/>(x1000 VNĐ)</th>

    </tr>
    <tr>
        <td>' . $total_result["total_customer"] . '</td>
        <td>' . $total_result["total_product"] . '</td>';
        if ($_SESSION["user_role"] == 1) {
            $html_total_result.='<td>' . number_format($total_result["total_at"]) . '</td>
        <td>' . number_format($total_result["total_pt"]) . '</td>';
        }
        $html_total_result.='<td>' . number_format($total_result["total_order_money"] / 1000) . '</td>
        <td>' . number_format($total_result["total_payment"] / 1000) . '</td>
        <td>' . number_format($total_result["total_excess_cash"] / 1000) . '</td>
        <td>' . number_format($total_result["total_debit"] / 1000) . '</td>

    </tr>
</table>';
        $customer_order_id = $last_customer_order_id;
        foreach ($list_customer_order as $customer_order) {
            $random_code = $customer_order->code_view;
            $color_photo_name = $customer_order->product_color . "_" . $customer_order->product_code . "_" . $customer_order->manufacture;
            $color_photo_name = $core->convert_string_friendly($color_photo_name) . ".jpg";
            $path_color_photo = dirname(dirname(dirname(__FILE__))) . DS . "photo" . DS . "extra_photo" . DS . "thumb_extra_photo" . DS . $color_photo_name;

            if (file_exists($path_color_photo)) {
                $src_photo = 'photo/extra_photo/' . $color_photo_name;
                $src_photo_thumb = 'photo/extra_photo/thumb_extra_photo/' . $color_photo_name;
            } else {
                $src_photo = 'photo/' . $customer_order->main_photo;
                $src_photo_thumb = 'photo/thumb_photo/200_' . $customer_order->main_photo;
            }
            if ($customer_order_id != $customer_order->customer_order_id) {
                $var_count++;
                $customer_order_id = $customer_order->customer_order_id;
                if ($customer_order->total_current_money > 0) {
                    $excess_cash = number_format($customer_order->total_current_money / 1000);
                    $debit = 0;
                } else {
                    $excess_cash = 0;
                    $debit = number_format($customer_order->total_current_money / 1000);
                }
                $html.='<tr class="tr_' . $customer_order->customer_order_id . '">';
                $html.='<td class="center" rowspan="' . $customer_order->total_product . '">' . $var_count . '</td>';
                $html.='<td class="center" rowspan="' . $customer_order->total_product . '">';
                if ($customer_order->facebook_link != "") {
                    $html.='<a href="' . $customer_order->facebook_link . '" target="_blank">' . $customer_order->facebook_name . '</a>';
                } else {
                    $html.=$customer_order->facebook_name;
                }
                $html.='<p></p>
        <select class="select_customer_order_status" id="select_customer_order_status_' . $customer_order->customer_order_id . '" style="width: 120px;" rel="' . $customer_order->customer_order_id . '" >
            <option value=0 ' . ($customer_order->customer_order_status == 0 ? "selected" : "") . '>Store</option>
            <option value=1 ' . ($customer_order->customer_order_status == 1 ? "selected" : "") . '>Online</option>
            <option value=2 ' . ($customer_order->customer_order_status == 2 ? "selected" : "") . '>Hàng có sẵn</option>
            <option value=3 ' . ($customer_order->customer_order_status == 3 ? "selected" : "") . '>Đã nhận hàng</option>
            <option value=4 ' . ($customer_order->customer_order_status == 4 ? "selected" : "") . '>Đang shipping</option>
            <option value=5 ' . ($customer_order->customer_order_status == 5 ? "selected" : "") . '>Khách đã nhận</option>
            <option value=6 ' . ($customer_order->customer_order_status == 6 ? "selected" : "") . '>Hết hàng</option>
            <option value=7 ' . ($customer_order->customer_order_status == 7 ? "selected" : "") . '>ORDER</option>
            <option value=8 ' . ($customer_order->customer_order_status == 8 ? "selected" : "") . '>Chưa chắc chắn</option>
            <option value=9 ' . ($customer_order->customer_order_status == 9 ? "selected" : "") . '>Chưa xác định</option>
        </select>
        <p></p>
        <button  class="btn btn-primary print_address_customer" type="button" rel="'.$customer_order->customer_id.'" >Print address</button>
        <p></p>
        <a target="_blank" href="../customerOrder.php?id='.$customer_order->customer_order_id.'&code='.$random_code.'">Link đơn hàng</a>';

                if($customer_order->type_calculate_payment !='normal'){
                    $html.= "<p></p><b>Khách buôn (".strtoupper($customer_order->type_calculate_payment).")</b>";
                }


                $html.='</td>';

                $html.='<td class="center" rowspan="' . $customer_order->total_product . '"><a href="addCustomer.php?id=' . $customer_order->customer_id . '" target="_blank">' . $customer_order->phone . '</a></td>';
                if ($customer_order->link_web == "") {
                    $html.='<td class="center color_status">' . $customer_order->product_code . '</td>';
                } else {
                    $html.='<td class="center color_status"><a href="' . $customer_order->link_web . '" target="_blank">' . $customer_order->product_code . '</a></td>';
                }


                $html.='<td class="center color_status">' . $customer_order->product_size . '</td>
    <td class="center color_status">
        Khách đặt: '.$customer_order->order_product_num.'
        <p>
            Đã mua: <span id="show_item_product_num_'.$customer_order->id.'">'.$customer_order->product_num.'</span>
            <div class="input-append">

                <input style="width: 50px;display: none" type="text" id="mrk_bought_product_num_'.$customer_order->id.'" name="customer_phone" size="5" value="'.$customer_order->product_num.'" >
            <button class="mrk_edit_product_num btn"  type="button" data-item-id="'.$customer_order->id.'">Sửa</button>
            <button class="mrk_update_product_num btn" style="display: none" type="button" data-item-id="'.$customer_order->id.'">Lưu</button>
            </div>
        </p>
    </td>
    <td class="center color_status">' . $customer_order->product_color . '</td>
    <td class="center color_status"><img rel="' . $src_photo . '" class="photo_product" src="' . $src_photo_thumb . '" width="100px"></td>
    <td class="center color_status">
        <select class="select_order_status common_order_status_' . $customer_order->customer_order_id . '" style="width: 120px;" rel="' . $customer_order->id . '" >
            <option value=0 ' . ($customer_order->order_status == 0 ? "selected" : "") . '>Store</option>
            <option value=1 ' . ($customer_order->order_status == 1 ? "selected" : "") . '>Online</option>
            <option value=2 ' . ($customer_order->order_status == 2 ? "selected" : "") . '>Hàng có sẵn</option>
            <option value=3 ' . ($customer_order->order_status == 3 ? "selected" : "") . '>Đã nhận hàng</option>
            <option value=4 ' . ($customer_order->order_status == 4 ? "selected" : "") . '>Đang shipping</option>
            <option value=5 ' . ($customer_order->order_status == 5 ? "selected" : "") . '>Khách đã nhận</option>
            <option value=6 ' . ($customer_order->order_status == 6 ? "selected" : "") . '>Hết hàng</option>
            <option value=7 ' . ($customer_order->order_status == 7 ? "selected" : "") . '>ORDER</option>
            <option value=8 ' . ($customer_order->order_status == 8 ? "selected" : "") . '>Chưa chắc chắn</option>
        </select>';
                if ($customer_order->order_status == 0) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->store_date) . '</div>';
                } elseif ($customer_order->order_status == 1) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->online_date) . '</div>';
                } elseif ($customer_order->order_status == 3) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->received_date) . '</div>';
                } elseif ($customer_order->order_status == 5) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->saled_date) . '</div>';
                } elseif ($customer_order->order_status == 7) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->customer_order_date) . '</div>';
                }
                $html.='<div class="history_status"></div>
    </td>
    <td class="center color_status">
        <p class="description_product_detail" data-item-id="' . $customer_order->id . '">'.nl2br(htmlspecialchars($customer_order->description)).'</p>
        <button class="popup_edit_note_product" class="btn" type="button" rel="' . $customer_order->id . '">Sửa</button>
    </td>';
        if($customer_order->order_status == 6){
            $html.=' <td class="center gp_3" id="td_price_' . $customer_order->id . '">0</td>
            <td class="center gp_2" id="td_stamp_price_' . $customer_order->id . '">0</td>
            <td class="center gp_1" id="td_store_price_' . $customer_order->id . '">0</td>';
        }else{

            $html.=' <td class="center gp_3" id="td_price_' . $customer_order->id . '">' . number_format($customer_order->product_price / 1000) . '</td>
            <td class="center gp_2" id="td_stamp_price_' . $customer_order->id . '">' . number_format($customer_order->stamp_price) . '</td>
            <td class="center gp_1" id="td_store_price_' . $customer_order->id . '">' . number_format($customer_order->store_price) . '</td>';
        }

        $html.='

    <td class="center gp_2" id="td_total_stamp_price_' . $customer_order->customer_order_id . '" rowspan="' . $customer_order->total_product . '">' . number_format($customer_order->total_at) . '</td>
    <td class="center gp_1" id="td_total_store_price_' . $customer_order->customer_order_id . '" rowspan="' . $customer_order->total_product . '">' . number_format($customer_order->total_pt) . '</td>
    <td class="center gp_3" id="td_total_price_' . $customer_order->customer_order_id . '" rowspan="' . $customer_order->total_product . '">' . number_format($customer_order->total_order_money / 1000) . '</td>
    <td class="center gp_3"  rowspan="' . $customer_order->total_product . '"><a  class="popup_zen_payment" id="href_payment_' . $customer_order->customer_order_id . '" href="javascript:void(0);" rel="' . $customer_order->customer_order_id . '">' . number_format($customer_order->total_payment / 1000) . '</a></td>
    <td class="center gp_3" id="td_debit_' . $customer_order->customer_order_id . '" rowspan="' . $customer_order->total_product . '">' . $debit . '</td>
    <td class="center gp_3" id="td_excess_cash_' . $customer_order->customer_order_id . '" rowspan="' . $customer_order->total_product . '">' . $excess_cash . '</td>

    <td class="center" rowspan="' . $customer_order->total_product . '">' . $customer_order->order_description . '</td>
    <td class="center gp_4" rowspan="' . $customer_order->total_product . '">' . $customer_order->address . '</td>
    <td class="center gp_4" rowspan="' . $customer_order->total_product . '">';

                if ($customer_order->province == 1)
                    $html.= "Ở tỉnh";
                else
                    $html.= "Ở HN";

                $html.='</td>
    <td class="center gp_4" rowspan="' . $customer_order->total_product . '">' . $customer_order->name . '</td>
    <td class="center gp_4" rowspan="' . $customer_order->total_product . '">' . $customer_order->bank_account . '</td>
    <td class="center" rowspan="' . $customer_order->total_product . '">
        <a class="btn btn-info btn_edit_customer_order" href="javascript:void(0)" rel="' . $customer_order->customer_order_id . '">
            <i class="icon-edit icon-white"></i>  
            Edit                                            
        </a>
        <a rel="' . $customer_order->customer_order_id . '" class="btn btn-danger btn_delete_order_detail" href="javascript:void(0)" style=" margin: 10px 0px;">
            <i class="icon-trash icon-white"></i> 
            Delete
        </a>
    </td>
</tr>';
            } else {

                $html.=' <tr class="tr_' . $customer_order->customer_order_id . '">';
                if ($customer_order->link_web == "") {
                    $html.='<td class="center color_status">' . $customer_order->product_code . '</td>';
                } else {
                    $html.='<td class="center color_status"><a href="' . $customer_order->link_web . '" target="_blank">' . $customer_order->product_code . '</a></td>';
                }


                $html.='<td class="center color_status">' . $customer_order->product_size . '</td>
    <td class="center color_status">
        Khách đặt: '.$customer_order->order_product_num.'
        <p>
            Đã mua: <span id="show_item_product_num_'.$customer_order->id.'">'.$customer_order->product_num.'</span>
            <div class="input-append">

                <input style="width: 50px;display: none" type="text" id="mrk_bought_product_num_'.$customer_order->id.'" name="customer_phone" size="5" value="'.$customer_order->product_num.'" >
            <button class="mrk_edit_product_num btn" type="button" data-item-id="'.$customer_order->id.'">Sửa</button>
            <button class="mrk_update_product_num btn" style="display: none" type="button" data-item-id="'.$customer_order->id.'">Lưu</button>
            </div>
        </p>
    </td>
    <td class="center color_status">' . $customer_order->product_color . '</td>
    <td class="center color_status"><img rel="' . $src_photo . '" class="photo_product" src="' . $src_photo_thumb . '" width="100px"></td>
    <td class="center color_status">
        <select class="select_order_status common_order_status_' . $customer_order->customer_order_id . '" style="width: 120px;" rel="' . $customer_order->id . '">
            <option value=0 ' . ($customer_order->order_status == 0 ? "selected" : "") . '>Store</option>
            <option value=1 ' . ($customer_order->order_status == 1 ? "selected" : "") . '>Online</option>
            <option value=2 ' . ($customer_order->order_status == 2 ? "selected" : "") . '>Hàng có sẵn</option>
            <option value=3 ' . ($customer_order->order_status == 3 ? "selected" : "") . '>Đã nhận hàng</option>
            <option value=4 ' . ($customer_order->order_status == 4 ? "selected" : "") . '>Đang shipping</option>
            <option value=5 ' . ($customer_order->order_status == 5 ? "selected" : "") . '>Khách đã nhận</option>
            <option value=6 ' . ($customer_order->order_status == 6 ? "selected" : "") . '>Hết hàng</option>
            <option value=7 ' . ($customer_order->order_status == 7 ? "selected" : "") . '>ORDER</option>
            <option value=8 ' . ($customer_order->order_status == 8 ? "selected" : "") . '>Chưa chắc chắn</option>
        </select>';
                if ($customer_order->order_status == 0) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->store_date) . '</div>';
                } elseif ($customer_order->order_status == 1) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->online_date) . '</div>';
                } elseif ($customer_order->order_status == 3) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->received_date) . '</div>';
                } elseif ($customer_order->order_status == 5) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->saled_date) . '</div>';
                } elseif ($customer_order->order_status == 7) {
                    $html.='<div>' . $core->changeDateMysqlToShow($customer_order->customer_order_date) . '</div>';
                }
                $html.='<div class="history_status"></div>
    </td>
    <td class="center color_status">

        <p class="description_product_detail" data-item-id="' . $customer_order->id . '">'.nl2br(htmlspecialchars($customer_order->description)).'</p>
        <button class="popup_edit_note_product" class="btn" type="button" rel="' . $customer_order->id . '">Sửa</button>
    </td>
    <td class="center gp_3" id="td_price_' . $customer_order->id . '">' . number_format($customer_order->product_price / 1000) . '</td>
    <td class="center gp_2" id="td_stamp_price_' . $customer_order->id . '">' . number_format($customer_order->stamp_price) . '</td>
    <td class="center gp_1" id="td_store_price_' . $customer_order->id . '">' . number_format($customer_order->store_price) . '</td>
    </tr>';
            }
        }
    }
}
?>